Implementing extent granularity authorization initialization processing in capi adapters

ABSTRACT

A method, system and computer program product are provided for implementing block extent granularity authorization initialization processing in Coherent Accelerator Processor Interface (CAPI) adapters. A master owning client and CAPI Server Register space assigned to the Master Owning Client are identified. Address mapping is created for the Master Owning Client to access the assigned CAPI Server Register space. The Master Owning Client is enabled to send commands to the CAPI adapter, other CAPI clients are prevented from sending commands to the CAPI adapter via the CAPI Server Register space assigned to the Master Owning Client.

FIELD OF THE INVENTION

The present invention relates generally to the data processing field,and more particularly, relates to a method, computer system and computerprogram product for implementing block extent granularity authorizationinitialization processing in Coherent Accelerator Processor Interface(CAPI) adapters.

DESCRIPTION OF THE RELATED ART

Persistent secondary storage is a component of virtually all computersystems. This storage is usually a block device such as a hard diskdrive or flash storage device. Storage adapters often are used toconnect a host computer system to peripheral storage I/O devices such ashard disk drives, solid state drives, tape drives, compact disk drives,and the like.

In a traditional computer system an application that needs to read orwrite data to the block device makes an Operating System (OS) and/orFile System (FS) call to read or write the requested blocks of data. TheOperating System or File System is a Trusted part of the computer systemand as part of a Read/Write request will verify or authenticate that theapplication is allowed to access the requested blocks of data. If theauthentication is successful, the OS will build a command for theRead/Write request and send the command to the Host Bus Adapter (HBA) toservice. Since the HBA can only receive commands from the OS, the HBAknows that the requested range of Blocks has been authenticated and issafe to execute the command.

IBM has introduced a new Block Device I/O model as part of the OpenPOWERFoundation. This new Block Device I/O model uses Coherent AcceleratorProcessor Interface (CAPI) technology. CAPI allows an application tobuild a Read/Write command for an input/output adapter (IOA) and send itdirectly to the IOA, bypassing the OS/FS and as such also bypasses thetraditional authentication. Without authentication, an application canget to data that it should not be allowed to access. For example, in aserver system that contains proprietary data for a first competitor anda second competitor, the lack of authentication would allow the firstcompetitor to access second competitor's data.

Current techniques for block device authorization outside of an OS/FSuse out-of-band techniques such as zoning having a granularity level ofthe block device or Logical Unit (LUN).

A need exists for an effective mechanism to implement block extentgranularity authorization initialization in Coherent AcceleratorProcessor Interface (CAPI) adapters in a computer system. It isdesirable that such mechanism enables effective and efficientutilization of the CAPI adapter, bypassing many host CPU requirementsfor performing IO operations.

SUMMARY OF THE INVENTION

Principal aspects of the present invention are to provide a method,system and computer program product for implementing block extentgranularity authorization initialization processing in CoherentAccelerator Processor Interface (CAPI) adapters. Other important aspectsof the present invention are to provide such method, system and computerprogram product substantially without negative effects and that overcomemany of the disadvantages of prior art arrangements.

In brief, a method, system and computer program product are provided forimplementing block extent granularity authorization initializationprocessing in Coherent Accelerator Processor Interface (CAPI) adapters.A master owning client and CAPI Server Register space assigned to theMaster Owning Client are identified. Address mapping is created for theMaster Owning Client to access the assigned CAPI Server Register space.The Master Owning Client is enabled to send commands to the CAPIadapter, other CAPI clients are prevented from sending commands to theCAPI adapter via the CAPI Server Register space assigned to the MasterOwning Client.

In accordance with features of the invention, the Master Owning Clientis identified as trusted and is default authorized to all devices andfunctions under control of the CAPI adapter.

BRIEF DESCRIPTION OF THE DRAWINGS

The present invention together with the above and other objects andadvantages may best be understood from the following detaileddescription of the preferred embodiments of the invention illustrated inthe drawings, wherein:

FIGS. 1A and 1B, and FIG. 1C respectively illustrates an examplecomputer for implementing Coherent Accelerator Processor Interface(CAPI) authorization in a CAPI adapter and an example CAPI authorizationhandle array elements in accordance with the preferred embodiments;

FIGS. 2A and 2B illustrates example CAPI authorization operations tovalidate a command in accordance with the preferred embodiments;

FIGS. 3A, 3B, 3C, 3D, 3E and 3F illustrates example read command withCAPI authorization model and authentication process operations inaccordance with the preferred embodiments;

FIG. 4 illustrates example CAPI authorization model processingoperations in accordance with the preferred embodiments;

FIG. 5 illustrates example CAPI authorization initialization processingoperations in accordance with the preferred embodiments;

FIG. 6 illustrates example CAPI authorization processing operations inaccordance with the preferred embodiments;

FIG. 7 illustrates example CAPI authorization command flow processingoperations in accordance with the preferred embodiments;

FIG. 8 illustrates example CAPI authorization enforcement processingoperations in accordance with the preferred embodiments;

FIG. 9 illustrates example CAPI authorization mechanism and processingoperations in accordance with the preferred embodiments;

FIG. 10 illustrates example CAPI deauthorization processing operationsin accordance with the preferred embodiments;

FIGS. 11A and 11B illustrate example CAPI authorization read commandprocessing operations in accordance with the preferred embodiments; and

FIG. 12 is a block diagram illustrating a computer program product inaccordance with the preferred embodiment.

DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

In the following detailed description of embodiments of the invention,reference is made to the accompanying drawings, which illustrate exampleembodiments by which the invention may be practiced. It is to beunderstood that other embodiments may be utilized and structural changesmay be made without departing from the scope of the invention.

The terminology used herein is for the purpose of describing particularembodiments only and is not intended to be limiting of the invention. Asused herein, the singular forms “a”, “an” and “the” are intended toinclude the plural forms as well, unless the context clearly indicatesotherwise. It will be further understood that the terms “comprises”and/or “comprising,” when used in this specification, specify thepresence of stated features, integers, steps, operations, elements,and/or components, but do not preclude the presence or addition of oneor more other features, integers, steps, operations, elements,components, and/or groups thereof.

In accordance with features of the invention, a method, system andcomputer program product are provided for implementing block extentgranularity authorization initialization processing in CoherentAccelerator Processor Interface (CAPI) adapters in accordance with thepreferred embodiments.

Having reference now to the drawings, in FIGS. 1A and 1B, there is shownan example computer system generally designated by the referencecharacter 100 for implementing Coherent Accelerator Processor Interface(CAPI) authorization initialization processing in a CAPI adapter 102 inaccordance with the preferred embodiments. Computer system 100 includesone or more processors 104, or central processor units (CPUs) 104 (oneshown) coupled to a system memory 106 and coupled by an I/O hub orCoherent Attach Processor Proxy (CAPP) 108 and Peripheral ComponentInterconnect Express (PCI-Express or PCIE) connection to the CAPIadapter 102. The CAPI adapter 102 includes an Authorization Table 112containing multiple Authorization Entries to implement authorization inaccordance with the preferred embodiments.

As shown in FIG. 1B, computer system 100 includes an example storagestack 120 including user CAPI client 122, an operating system 124including a file system 126, a hypervisor 128 coupled by CAPI/PCIEinterface block 130 to the CAPI adapter 102, which includes a filesystem authorization function 132 in accordance with the preferredembodiments. The CAPI/PCIE interface block 130 includes a CAPI transportmechanism that rides on top of a system transport mechanism or PCIE. TheCAPI client 122 is a unique system entity that has a separatelyidentified set of permissions to access CAPI adapter function.

Referring also to FIG. 1C, the authorization table 112 includesauthorization entries 140 to implement authorization in accordance withthe preferred embodiments. The illustrated example authorization entry140 includes a CAPI Client user ID 150, a CAPI server register space 152including resource and extents information and a CAPI set of allowedfunctions 154 including allowed access types in accordance with thepreferred embodiments.

In accordance with features of the invention, the CAPI server registerspace 152 is CAPI adapter system bus address space that containsmultiple copies of register(s) that can be used to start a command. Eachcopy is referred to as CAPI Server registers. Each CAPI Server registershave access to only the adapter Functions that the specific CAPI Serverregisters have previously been authorized to.

In accordance with features of the invention, a CAPI client ID is anindex to a specific copy of CAPI Server registers. One or more of theCAPI Clients is identified as Master Client(s). The CAPI Serverregisters for the Master Client are used to perform CAPI adapterinitialization functions and these specific CAPI Server registers haveaccess to all CAPI adapter functions.

Referring now to FIGS. 2A and 2B, there are shown example CAPIauthorization operations to validate a command in accordance with thepreferred embodiments. In FIG. 2A, example CAPI authorization operationsto validate a command are generally designated by the referencecharacter 200. Validation is done by the host, only authorized contextsmay write to the given MMIO space 202 shown in FIG. 2A and as indicatedin a block 222 in FIG. 2B. In FIG. 2A, an IO Adapter Request ControlBlock (IOARCB) 206 contains an authorization handle 208. As indicated atblock 222 in FIG. 2B and shown with authorization entry 140 in FIG. 2A,trusted handle data contains CAPI Server ID 214 and Resource and Range212. As indicated in a block 224, MMIO Space 202 is indexed by CAPIServer ID 214. As indicated in a block 226, Process Element 216 shown inFIG. 2A, is indexed by CAPI Server ID. As indicated in a block 228,Process Element 216 contains information needed to translate hostEffective Address to physical address.

Referring now to FIGS. 3A, 3B, 3C, 3D, 3E and 3F, there are shownexample read command operations including CAPI authorization model andauthentication process operations for a read command in accordance withthe preferred embodiments.

In FIG. 3A, example CAPI authorization operations for the read commandare generally designated by the reference character 300. Example CAPIauthorization operations 300 are shown with a user 302, OS 304,hypervisor 306, and CAPI adapter 102. Assume the OS is the “owning”context as indicated in a block 310 in FIG. 3B. As indicated in a block312, User does a syscall to “open” the file/hdisk. OS does an hcall toadd the user's context to the context list as indicated in a block 314.The hypervisor adds user's context to context list as indicated in ablock 316. The hypervisor does CAPI process to add the context into theadapter as indicated in a block 318.

In FIG. 3C, example CAPI authorization operations for the read commandare generally designated by the reference character 320. Example CAPIauthorization operations 320 are shown with user 302, OS 304, hypervisor306, and CAPI adapter 102. In FIG. 3D, as indicated in a block 322, thehypervisor returns the user's CAPI ID. The OS does a request to theadapter to “create authorization” and OS supplies User CAPI ID, andsupplies resource and extents to add the authorization as indicated in ablock 324. The adapter allocates an authorization handle for each extentand fills in the CAPI ID and extent information as indicated in a block326. As indicated in a block 328, the adapter returns the new userauthorization handle(s) to the operating system.

In FIG. 3E, example CAPI authorization operations for the read commandare generally designated by the reference character 330. Example CAPIauthorization operations 330 are shown with user 302, OS 304, hypervisor306, and CAPI adapter 102. In FIG. 3F, as indicated in a block 332 OSreturns authorization handle to the user. User sends a request to theadapter to issue the read as indicated in a block 334. Adapter uses theCAPI ID to identify which context to use as indicated in a block 336.Adapter uses the context to translate the host request address asindicated in a block 340.

As indicated in a block 342, adapter fetches the IO Adapter RequestControl Block (IOARCB). Adapter gets the authorization handle from theIOARCB as indicated in a block 344. Adapter verifies the authorizationhandle is the current version (all bits match) as indicated in a block346.

As indicated in a block 348 adapter verifies the authorization handle isfor the CAPI ID that was used. Adapter verifies that the range for therequest is allowed (data in the authorization handle data) as indicatedin a block 350. Adapter does the read as indicated in a block 352.Adapter translates the address and sends the data to the host (into theuser's memory) as indicated in a block 354. Adapter writes a queue,writes a memory location, generates an interrupt or whatever the desiredcompletion as indicated in a block 356.

In accordance with features of the invention, the CAPI authorizationmodel is based on split enforcement of rights, as illustrated anddescribed with respect to FIG. 4.

Referring now to FIG. 4, there are shown example CAPI authorizationmodel operations in accordance with the preferred embodiments startingat a block 400. As indicated in a block 402, the Trusted OS enforceswhich CAPI Server registers can be accessed by which Clients. This isaccomplished by, for example mapping a virtual address for a Client to aCAPI Server register space. As indicated in a block 404, the ParentClient (initially the Master Owning Client) notifies the CAPI adapter102 of which functions are allowed for a Child's CAPI Server. Asindicated in a block 406, the Parent Client sends a command orcommand(s) to its previously authorized CAPI Server register spaceidentifying the Functions, Commands, Extents, allowed to be sent to thenew Child's CAPI Server register space. As indicated in a block 408, theadapter generates and returns opaque Authorization Handle tokens asappropriate for each requested authorization element. The AuthorizationHandle is encoded in an implementation unique way to optimizeauthentication performance on the Read/Write commands. As indicated in ablock 410, the adapter enforces the functions allowed on each commandsent to a CAPI Server register space. At block 410, the Client sets theappropriate “Authorization Handle” in the Command; and the adapter usesthe “Authorization Handle” to validate the command is allowed to beexecuted by the receiving CAPI Server register space.

Referring now to FIG. 5, there are shown example CAPI authorizationinitialization process operations in accordance with the preferredembodiments starting at a block 500. As indicated in a block 502 adapterreset completes, and the Trusted OS Boot process transitions the adapterinto CAPI mode and identifies a Master Owning Client component and theadapter CAPI Server Register space assigned to the Master Owning Client.The Master Owning Client is default authorized to all Devices andfunctions under control of the adapter as indicated in a block 504. TheMaster Owning Client is identified as trusted as indicated in a block506. As indicated in a block 508, the Trusted OS creates an addressmapping for the Master Owning Client to access the CAPI Server Registerspace assigned to the Master Owning Client. This address mapping is notgiven to any other Client or Application.

The Master Owning Client can now send commands to the adapter asindicated in a block 510. As indicated in a block 512, other Clients orApplications do not have an address mapping to the Master OwningClient's Server register space and as such cannot send commands to theadapter via these registers.

Referring now to FIG. 6, there are shown example CAPI authorizationprocess operations in accordance with the preferred embodiments startingat a block 600. As indicated in a block 602, Application Client requestsauthorization to a file from the File system. The File system validatesthe request, determines the location of each Extent that comprises thefile, requests Authorization to each Extent from a System CAPIAuthorization manager as indicated in a block 604. The System CAPIAuthorization manager determines which CAPI Adapter is needed to serviceeach Extent, requests the CAPI Client manager to assign a (Child) ClientID and CAPI Server Register range to the requesting Application Client,and requests a previously authorized CAPI Parent Client (initially theMaster Client) to authorize the Child ID to the list of Extents asindicated in a block 606. As indicated in a block 608, The CAPI ParentClient sends a “Create Authorizations” command to the CAPI Adapter viathe Parent's CAPI Server Registers. Parameters are CAPI Child Client ID;List of Extents, for each Extent includes CAPI Parent AuthorizationHandle, and Extent Start LBA and number of Blocks; and List of otherCommands/Adapter resources, for each command/resource includes CAPIParent Authorization Handle. The CAPI Adapter validates that the ParentAuthorization Handle and CAPI Server Register range is valid for thespecific Extent/Command/Resource; creates an Authorization List byAssigning a new Child Authorization Handle for each requested, validatedExtent/Command/Resource; and returns the Authorization List to theParent Client as indicated in a block 610. The Parent Client returns theAuthorization List to Authorization Manager as indicated in a block 612.The Authorization Manager returns the Authorization List and the ChildClient ID to the File System and the File System returns theAuthorization List and the Child Client ID to the Application Client asindicated in a block 614.

Referring now to FIG. 7, there are shown example CAPI authorizationcommand flow process operations in accordance with the preferredembodiments starting at a block 700. As indicated in a block 702, theapplication client builds a command. parameters included are start LBAand number of LBAs; and child's authorization handle. As indicated in ablock 704, the application client sends the command directly to the CAPIadapter via the application clients's CAPI server registers. Asindicated in a block 706, the capi adapter uses the authorization handleand the receiving CAPI server register address to validate that therequesting client is authorized to perform the command. As indicated ina block 708, the CAPI adapter executes the command and sends completionback to the application client.

Referring now to FIG. 8, there are shown example CAPI authorizationenforcement process operations in accordance with the preferredembodiments starting at a block 800. As indicated in a block 802, accessto CAPI adapter server register spaces is enforced by the trusted OScreating address space mappings for individual clients/applications. Asindicated in a block 804, the adapter enforces access rights on eachcommand by verifying that the Authorization Handle passed in the commandbelong to the requesting Client and that the Client is authorized to therequested command/function/Extent.

Referring now to FIG. 9, there are shown example CAPI authorizationmechanism and process operations in accordance with the preferredembodiments starting at a block 900. As indicated in a block 902, encodethe Authorization Handle as multiple fields including Lookup TableIndex. The size of the Lookup Table Index field should be selected bythe implementation to maximize the number of potentially activeAuthorization Handles. The Authorization Handle includes ImplementationUnique Encode and the size of this field should be minimized but stillbe capable of detecting stale Credentials. As indicated in a block 904,create an Authorization Table containing multiple Authorization Entries.Each Authorization Entry contains Authorization Handle; CAPI Serverregisters ID; Start Logical Block Address of the Extent; and Range ofLogical Block Addresses for the Extent. As indicated in a block 906 theAuthentication Process when a command is received includes: Extract theLookup Table Index from the Authorization Handle contained in thereceived command. Use the Lookup table Index to locate the AuthorizationEntry. Compare the Authorization Entry's CAPI Server Registers ID to theReceiving CAPI Server Registers ID. Compare the Authorization Entry'sAuthorization handle to the Authorization Handle contained in thereceived command. Any Compare failures result in the command beingrejected.

Referring now to FIG. 10, there are shown example CAPI deauthorizationprocess operations in accordance with the preferred embodiments startingat a block 1000. As indicated in a block 1002, the Application ChildClient (or any Parent, GrandParent, and the like in the lineage) sends a“Delete Authorizations” command to the CAPI Adapter via the Client'sCAPI Server Registers. Parameters are: CAPI Child Client ID; List ofExtents. For each Extent include CAPI Child Authorization Handle; ExtentStart LBA and number of Blocks; and List of other Commands/Adapterresources. For each command/resource include CAPI Child AuthorizationHandle. As indicated in a block 1004, the CAPI Adapter validates thatthe Requester is either the Child or a Parent in the lineage; anddeletes the Authorizations in the Lists.

Referring now to FIGS. 11A and 11B, there are shown example CAPIauthorization read command processing operations in accordance with thepreferred embodiments. In FIG. 11A, example CAPI authorizationoperations for the read command are generally designated by thereference character 1100. Example CAPI authorization operations 1100 areshown with a user 1102, OS 1104, file system 1106, hypervisor 1108, andCAPI adapter 102. As indicated in a block 1102 in FIG. 11B, the OS goesto the filesystem and hypervisor to do the open. The hypervisor giveCAPI ID, filesystem does authorization checks and returns authorizationinfomation and file handle (FH) as indicated in a block 1104. Asindicated in a block 1106, OS (at behest of filesystem) issues a createauthorization request. As indicated in a block 1108, Lseek only touchesuser filesystem. Read goes directly to CAPI Adapter as indicated in ablock 1110. As indicated in a block 1112, CAPI adapter validates CAPIID, authorization handle (AH), extents (filesystem authorization). Thenthe CAPI adapter does the operation (op), such as read request andresponds with the read data as indicated in a block 1114.

Referring now to FIG. 12, an article of manufacture or a computerprogram product 1200 of the invention is illustrated. The computerprogram product 1200 is tangibly embodied on a non-transitory computerreadable storage medium that includes a recording medium 1202, such as,a floppy disk, a high capacity read only memory in the form of anoptically read compact disk or CD-ROM, a tape, or another similarcomputer program product. Recording medium 1202 stores program means1204, 1206, 1208, and 1210 on the medium 1202 for carrying out themethods for implementing Coherent Accelerator Processor Interface (CAPI)authorization initialization processing in the CAPI adapter 102 of apreferred embodiment in the system 100 of FIGS. 1A, and 1B.

A sequence of program instructions or a logical assembly of one or moreinterrelated modules defined by the recorded program means 1204, 1206,1208, and 1210, direct the computer system 100 for implementing CoherentAccelerator Processor Interface (CAPI) authorization initializationprocessing in a CAPI adapter 102 of a preferred embodiment.

While the present invention has been described with reference to thedetails of the embodiments of the invention shown in the drawing, thesedetails are not intended to limit the scope of the invention as claimedin the appended claims.

1-10. (canceled)
 11. A system for implementing block extent granularityauthorization initialization processing in a Coherent AcceleratorProcessor Interface (CAPI) adapter comprising: a system processor; saidsystem processor identifying a Master Owning Client and a CAPI ServerRegister space assigned to the Master Owning Client; said systemprocessor creating address mapping for the Master Owning Client toaccess the assigned CAPI Server Register space, enabling the MasterOwning Client to send commands to the CAPI adapter.
 12. The system asrecited in claim 11, includes control code stored on a computer readablemedium, wherein said control code being used by said system processor toimplement block extent granularity authorization initializationprocessing.
 13. The system as recited in claim 11, includes a transportmechanism comprising a Coherent Accelerator Processor Interface (CAPI)and Peripheral Component Interconnect Express (PCIE)
 14. The system asrecited in claim 13, wherein said system processor includes CAPI logicfor mapping CAPI over PCIE.
 15. The system as recited in claim 11,wherein said system processor creating address mapping for the MasterOwning Client to access the assigned CAPI Server Register space includessaid system processor identifying the Master Owning Client as trusted.16. The system as recited in claim 11, wherein said system processorcreating address mapping for the Master Owning Client to access theassigned CAPI Server Register space includes preventing other CAPIclients from sending commands to the CAPI adapter via the CAPI ServerRegister space assigned to the Master Owning Client.
 17. The system asrecited in claim 16, wherein the CAPI adapter includes an authorizationtable, said authorization table providing a CAPI client identification(ID) for the Master Owning Client with the CAPI server register spaceand all allowed CAPI adapter functions.
 18. The system as recited inclaim 11, wherein said authorization table providing for each said CAPIclient, a CAPI client identification (ID), a CAPI server register spaceassigning resource ownership to the CAPI client and a CAPI set ofallowed CAPI adapter functions.
 19. The system as recited in claim 11,wherein the CAPI adapter includes a file system authorization functionenforcing access to respective CAPI server registers to respective CAPIclients.
 20. The system as recited in claim 11, includes said systemprocessor preventing other CAPI clients from sending commands to theCAPI adapter via the CAPI Server Register space assigned to the MasterOwning Client.